<?php 


$users=include_once './user.php';


foreach ($users as $user) {


	if ($user['username']==$_POST['username']) {
		if ($user['possword']==md5($_POST['possword'])) {
			session_start();
			$_SESSION['username']=$user['username'];
			$_SESSION['nikename']=$user['nikename'];
			echo "登录成功";
			header('Location:./indes.php');
			exit;
		}
	}
}

echo "账号密码错误";
header('Location:./indes.php');

 ?>